package img 
{
	import flash.display.Bitmap;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import ru.gosoplata.model.TmpModel;
	/**
	 * TODO: переписать вью на перья
	 */
	public class ChekPlane extends ScalePlane 
	{
		private var _chek:Bitmap = new Bitmap();
		private var _swChek:Boolean = true;
		
		public function ChekPlane() 
		{
			super(100);
		}
		
		public function get swChek():Boolean 
		{
			return _swChek;
		}
		
		public function set swChek(value:Boolean):void 
		{
			_swChek = value;
			_chek.visible = value;
		}
		
		override protected function init(e:Event):void 
		{
			super.init(e);
			
			_chek.bitmapData = TmpModel.loadedImages.getBitmapDataByName("input_plane_chek").bitmapData;
			_chek.x = 10;
			_chek.y = 10;
			addChild(_chek);
			this.isCheck(false);
		}
		
		override protected  function onClick(e:MouseEvent):void 
		{
			super.onClick(e);
			
			swChek = !_swChek;
		}
	}
}